import $http from '@/assets/js/http' 

//查询我的购买--详情
export function getmyPurchaseDetail(orderId,lang) {
    return $http.get('/api/mypurchase/detail', {
        params:{
            orderId:orderId,
            lang:lang,
        }
    });
}

//获取我的购买列表
export function getmyPurchaseList(userId,pageIndex,pageSize,lang) {
    return $http.get('/api/mypurchase/list', {
        params:{
            userId:userId,
            pageIndex:pageIndex,
            pageSize:pageSize,
            lang:lang,
        }
    });
}

//我的购买--确认收货
export function postmyPurchaseFinish(orderId,lang) {
    return $http.post('/api/mypurchase/finish', {
        orderId:orderId,
        lang:lang
    });
}

//我的购买--申请关闭
export function postmyPurchaseClose(orderId,reason,lang) {
    return $http.post('/api/mypurchase/applyClose', {
        orderId:orderId,
        reason:reason,
        lang:lang
    });
}

//我的购买----删除订单
export function postmyPurchaseDeleteOrder(orderId,lang) {
    return $http.post('/api/mypurchase/delete', {
        orderId:orderId,
        lang:lang
    });
}